

# Name of the Project.
PROJECT(FluidSPH CXX)

# Create a new build type
# For profiling with gprof.
SET(CMAKE_CXX_FLAGS_PROFILE "-pg -O0")
# For coverage profiling with gcov
SET(CMAKE_CXX_FLAGS_COVERAGE "-ftest-coverage -fprofile-arcs -O0")

# Set the compiler flags for C and C++.
IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
#  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0 -g3 -pedantic -Wall -ansi -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings -c `sdl-config --cflags` -v")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
#  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0 -g3 -pedantic -Wall -ansi -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings -c `sdl-config --cflags` -v")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

# Set the build type options are
# -None ()
# -Debug (-g)
# -Release
# -RelWithDebInfo (-O2 -g)
# -MinSizeRel
# Or any custom type.
# This can be overwritten with -D when using cmake.
if(NOT CMAKE_BUILD_TYPE)
    SET(CMAKE_BUILD_TYPE release)
endif(NOT CMAKE_BUILD_TYPE)

# See more output from the build.
IF(NOT CMAKE_VERBOSE_MAKEFILE)
    SET(CMAKE_VERBOSE_MAKEFILE OFF)
ENDIF(NOT CMAKE_VERBOSE_MAKEFILE)

# Used to make libraries shared.
SET(BUILD_SHARED_LIBS ON)

# Put the executables in the bin folder
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

#include_directories(${PROJECT_SOURCE_DIR}/audio)

SET(MAIN_SRC main.cpp Particle.cpp Particles.cpp)

add_executable(runme ${MAIN_SRC})

target_link_libraries(runme SDL GL GLU)
